/**
 * shuang
 */

import React, { Component } from 'react'
import {
    Text,
    View,
    Image,
    TouchableOpacity,
    Button,
    StyleSheet,
    Dimensions,
  } from 'react-native';
  
  const screenWidth = Dimensions.get('window').width;
  let channelWidth = screenWidth /  3;
export class HomeSaishiList extends Component {
  render() {
       
    const {item}=this.props;
    return (
         <TouchableOpacity   style={styles.contentStyle}>
             <View style = {{ width: screenWidth, backgroundColor: '' }}>
                <Text ></Text>
               <View style = {{ flexDirection: 'row', justifyContent: 'space-around' ,backgroundColor:'',}}>
                
                <View style={styles.bujuStyle}>
                 <Image source = {{ uri: item.homeLogo}} style = {styles.imageStyle} />
                  <Text numberOfLines={1} style={styles.textHeight}>{item.homeNm}</Text>
                </View>

               <View style={styles.bujuStyle}>
               <Text style={{marginTop:15}}>{item.eventNm}</Text>
                <Text style={{margin:5}}>{item.homeScore} - {item.awayScore}</Text>
                 {/*<Image source={require("../../Component/Common/picImages/home_yijieshu.png")} style = {styles.timeImagesStyle} />*/}
                  {item.matchStatus===1
                 ?<Image source={require("../../Component/Common/picImages/home_weikaishi.png")} style = {styles.timeImagesStyle} />
                 :item.matchStatus===8
                 ?<Image source={require("../../Component/Common/picImages/home_yijieshu.png")} style = {styles.timeImagesStyle} />
                 :<Image source={require("../../Component/Common/picImages/home_yikaishi.png")} style = {styles.timeImagesStyle} />
                 }
               </View>

               <View style={styles.bujuStyle}>
                <Image source = {{ uri: item.awayLogo }} style = {styles.imageStyle} />
                <Text numberOfLines={1} style={styles.textHeight}>{item.awayNm}</Text>
                </View>

            </View>
        </View>
        </TouchableOpacity>
    );
  }
  
}

export default HomeSaishiList

const styles=StyleSheet.create({
    contentStyle:{
        flexDirection:'row',
        marginTop:1, 
        height:120,
        width:'100%', 
        backgroundColor:'white',
    },
    bujuStyle:{
        flexDirection:'column',
        alignItems:'center',
        width:channelWidth
    },
    imageStyle:{
        width: 70,
        height: 70,
        alignItems:'center',
    },
    timeImagesStyle:{
        width: 70,
        height: 20,
        marginTop:0,
        alignItems:'center'
    },
    textHeight:{
        marginTop:10,
    },
  
  })
  const scaleSizeToFit = (s) => {
   return s * Dimensions.get('window').width / 414;
 }